//
//  NumberViewController.swift
//  iPhone
//
//  Created by Toj on 8/4/22.
//

import UIKit

class NumberViewController: STBaseViewController {
    
    
    private lazy var numLabel: UINumberLabel = {
       let view = UINumberLabel()
        view.transformStyle = .linear
        view.format = "%.2f"
        view.textAlignment = .center
        return view
    }()
    
    override var view: UIView! {
        set {
            super.view = newValue
            CM.begin(time: st_objectName)
        }
        get { return super.view }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        numLabel.frame = CGRect(x: 0, y: 100, width: 200, height: 40)
        numLabel.center.x = view.center.x
        view.addSubview(numLabel)
        numLabel.start(5.6, end: 2.3)
        
        
        tt_isNavigationBarHidden = true
        navigationBar.leftBarView?.isHidden = true
        view.backgroundColor = .white
    }
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        let diff = CM.end(time: st_objectName)
        print("-->toj: \(st_objectName), diff: \(diff)")
    }
}
